feat: Plot uses subscribeMessageRange#1004
Open
rodrigo-rodrigues-ctw wants to merge 25 commits intodevelopfrom
Open
feat: Plot uses subscribeMessageRange#1004rodrigo-rodrigues-ctw wants to merge 25 commits intodevelopfrom
rodrigo-rodrigues-ctw wants to merge 25 commits intodevelopfrom
Conversation
packages/suite-base/src/components/PanelExtensionAdapter/useSubscriberMessageRange.test.ts
Outdated
Show resolved
Hide resolved
packages/suite-base/src/panels/Plot/builders/CustomDatasetsBuilder.test.ts
Show resolved
Hide resolved
packages/suite-base/src/panels/Plot/builders/IDatasetsBuilder.ts
Outdated
Show resolved
Hide resolved
| if (existing) { | ||
| const keysChanged = | ||
| existing.seriesKeys.size !== currentKeys.size || | ||
| [...currentKeys].some((k) => !existing.seriesKeys.has(k)); |
Contributor
There was a problem hiding this comment.
Why not iterating currentKeys directly here? Wont this create a new array deconstructing currentKeys everytime is called?
Contributor
Author
There was a problem hiding this comment.
currentKeys is a Set, I can't call .some method directly
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



User-Facing Changes
Use
subscribeMessageRangefor improved data handling in Plot panel.Description
Refactor existing plot components to support
subscribeMessageRange, enhancing performance and usability. Key changes include the rework of interaction handlers and dataset builders to accommodate the new message range functionality.The main idea of this PR is to stop the use of BlockLoader in Plot panel. BlockTopicCursor should be deprecated.
Created useSubscribeMessageRange hook to enable Panels that are not using PanelExtensionAdapter to use its logic directly. Down the line I think it would make sense to convert all the panels to PanelExtensionAdapter.
In this video, I'm comparing both implementations of Plot
https://github.com/user-attachments/assets/d5e55820-9733-4142-be24-1ca92a71df2d
Checklist